import axios from 'axios'
import { baseURL } from '../baseurl'

export default function queryData(key,page,rows,sortBy,desc) {
    return axios.get(baseURL + `/team/page?key=${key}&page=${page}&rows=${rows}&sortBy=${sortBy}&desc=${desc}`).then(res => {
    // return axios.get(baseURL + `/team/page?key=${key}&page=${page}&rows=${rows}&sortBy=${creat_time}&desc=${desc}`).then(res => {
        console.log(res)
        if(res.data == '')
        {
            return Promise.reject(['暂时无该数据'])
        }
        else
        {
            return Promise.resolve(res.data)
        }
    })

}